package com.jianggy.adapter.springmvc;

/**
 * @author jianggy
 * @time 2018年11月13日 下午2:29:21
 * @description
 */
public class SimpleControllerHandlerAdapter implements HandlerAdapter {

public Object handler;
	
	public SimpleControllerHandlerAdapter() {
		
	}
	public SimpleControllerHandlerAdapter(Object handler) {
		this.handler = handler;
	}
	@Override
	public String handler() {
		return ((SimpleControllerHandler)handler).handle();
	}

	@Override
	public boolean support(Object handler) {
		this.handler = handler;
		if (this.handler instanceof SimpleControllerHandler) {
			return true;
		}else {
			return false;
		}
	}
	
}
